<template>
  <div>
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
      <el-form-item label="单位名称" prop="companyName">
        <el-input v-model="queryParams.companyName" placeholder="请输入" size="small"></el-input>
      </el-form-item>
      <el-form-item label="组织机构代码（统一社会信用代码）" prop="orgCode">
        <el-input v-model="queryParams.orgCode" placeholder="请输入" size="small"></el-input>
      </el-form-item>

      <el-form-item label="行政区名称" prop="belongRegion">
        <el-select v-model="queryParams.belongRegion" size="small" placeholder="请选择" clearable>
          <el-option v-for="item in areaList" :value="item.value" :label="item.label"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
      </el-form-item>
    </el-form>
    <el-table v-loading="loading" :data="list" border stripe :key="1">
      <el-table-column label="排行" align="center" prop="applyCode"/>
      <el-table-column label="单位名称" align="center" prop="controlName" min-width="220"/>
      <el-table-column label="全国荣誉数量" align="center" prop="createTime"/>
      <el-table-column label="省市级荣誉数量" align="center" prop="createTime"/>
      <el-table-column label="区级荣誉数量" align="center" prop="createTime"/>
      <el-table-column label="协会荣誉数量" align="center" prop="createTime"/>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
      class="pagination-container"
    />
  </div>
</template>
<script>
import {
  companyApplyQuery // 人员信息
} from "@/api/manage/approval";
export default {
  name: "honorLevel",
  data() {
    return {
      // 遮罩层
      loading: false,
      list: [],
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        companyName: "",
        orgCode: "",
        belongRegion: ""
      },
      total: 0,
      areaList: [
        { value: "浦东新区", label: "浦东新区" },
        { value: "崇明区", label: "崇明区" },
        { value: "奉贤区", label: "奉贤区" },
        { value: "青浦区", label: "青浦区" },
        { value: "松江区", label: "松江区" },
        { value: "金山区", label: "金山区" },
        { value: "嘉定区", label: "嘉定区" },
        { value: "闵行区", label: "闵行区" },
        { value: "宝山区", label: "宝山区" },
        { value: "杨浦区", label: "杨浦区" },
        { value: "徐汇区", label: "徐汇区" },
        { value: "普陀区", label: "普陀区" },
        { value: "长宁区", label: "长宁区" },
        { value: "静安区", label: "静安区" },
        { value: "虹口区", label: "虹口区" },
        { value: "黄浦区", label: "黄浦区" }
      ]
    };
  },
  created() {
    this.getList();
  },
  methods: {
    getList() {
      this.loading = true;
      companyApplyQuery(this.queryParams)
        .then(res => {
          console.log(res, "23232");
          if (res.errorCode == "000000") {
            this.list = res.data.list;
            this.total = res.data.total;
          }
        })
        .finally(() => {
          this.loading = false;
        });
    },
     handleQuery() {
        this.getList()
    }
  }
};
</script>
<style lang="scss" scoped>
</style>